package com.liushuo.controller;

import com.liushuo.DTO.AddExerciseSetDTO;
import com.liushuo.VO.AddExerciseSetVO;
import com.liushuo.entity.ExerciseSet;
import com.liushuo.entity.Question;
import com.liushuo.service.ExerciseSetService;

import java.util.Date;
import java.util.List;

public class ExerciseSetController {

    private final ExerciseSetService exerciseSetService = new ExerciseSetService();

    public AddExerciseSetVO importQuestions(List<Question> questions) {
        return exerciseSetService.importQuestions(questions);
    }

    public AddExerciseSetVO addExerciseSet(int totalQuestions, int questionsWithParentheses, int gradeLevel){
        return exerciseSetService.addExerciseSet(totalQuestions, questionsWithParentheses, gradeLevel);
    }

    public void setExerciseSetScore(Long exerciseSetId, int score){
    	exerciseSetService.setExerciseSetScore(exerciseSetId, score);
    }

    public List<ExerciseSet> getExerciseSetByUserIdAndDate(String userId, Date startDate, Date endDate){
    	return exerciseSetService.getExerciseSetByUserIdAndDate(userId, startDate, endDate);
    }

}
